package com.wkq.database.dao;

import java.util.Map;

import org.greenrobot.greendao.AbstractDao;
import org.greenrobot.greendao.AbstractDaoSession;
import org.greenrobot.greendao.database.Database;
import org.greenrobot.greendao.identityscope.IdentityScopeType;
import org.greenrobot.greendao.internal.DaoConfig;

import com.wkq.database.dao.ExceptionInfo;
import com.wkq.database.dao.UserInfo;

import com.wkq.database.dao.ExceptionInfoDao;
import com.wkq.database.dao.UserInfoDao;

// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.

/**
 * {@inheritDoc}
 * 
 * @see org.greenrobot.greendao.AbstractDaoSession
 */
public class DaoSession extends AbstractDaoSession {

    private final DaoConfig exceptionInfoDaoConfig;
    private final DaoConfig userInfoDaoConfig;

    private final ExceptionInfoDao exceptionInfoDao;
    private final UserInfoDao userInfoDao;

    public DaoSession(Database db, IdentityScopeType type, Map<Class<? extends AbstractDao<?, ?>>, DaoConfig>
            daoConfigMap) {
        super(db);

        exceptionInfoDaoConfig = daoConfigMap.get(ExceptionInfoDao.class).clone();
        exceptionInfoDaoConfig.initIdentityScope(type);

        userInfoDaoConfig = daoConfigMap.get(UserInfoDao.class).clone();
        userInfoDaoConfig.initIdentityScope(type);

        exceptionInfoDao = new ExceptionInfoDao(exceptionInfoDaoConfig, this);
        userInfoDao = new UserInfoDao(userInfoDaoConfig, this);

        registerDao(ExceptionInfo.class, exceptionInfoDao);
        registerDao(UserInfo.class, userInfoDao);
    }
    
    public void clear() {
        exceptionInfoDaoConfig.clearIdentityScope();
        userInfoDaoConfig.clearIdentityScope();
    }

    public ExceptionInfoDao getExceptionInfoDao() {
        return exceptionInfoDao;
    }

    public UserInfoDao getUserInfoDao() {
        return userInfoDao;
    }

}
